@echo off
echo === 员工API测试脚本 ===

set BASE_URL=http://localhost:8080

echo 1. 添加2025年员工数据...
curl -X POST "%BASE_URL%/employee" -H "Content-Type: application/json" -d "{\"employeeNo\": \"E2025011\", \"idCard\": \"440101199201010011\", \"phone\": \"13800000111\", \"email\": \"test2025011@example.com\", \"entryDate\": \"2025-01-15\", \"name\": \"张三\"}"

echo.
echo.

echo 2. 添加2026年员工数据...
curl -X POST "%BASE_URL%/employee" -H "Content-Type: application/json" -d "{\"employeeNo\": \"E2026016\", \"idCard\": \"440101199201010016\", \"phone\": \"13800000116\", \"email\": \"test2026016@example.com\", \"entryDate\": \"2026-01-05\", \"name\": \"孙八\"}"

echo.
echo.

echo 3. 查询所有员工...
curl -X GET "%BASE_URL%/employee/list"

echo.
echo.

echo 4. 查询2025年员工...
curl -X GET "%BASE_URL%/employee/list?entryDateStart=2025-01-01&entryDateEnd=2025-12-31"

echo.
echo.

echo 5. 查询2026年员工...
curl -X GET "%BASE_URL%/employee/list?entryDateStart=2026-01-01&entryDateEnd=2026-12-31"

echo.
echo === 测试完成 ===
pause 